package com.algo.pattern.observable.model;

import com.algo.pattern.observable.model.OrderInfo;

/**
 * 库存更新的消息
 */
public class StockUpdateMessage {
    /**
     * 消息ID
     */
    private String messageId;
    /**
     * 操作类型，比如，下单扣减库存，取消订单加库存
     */
    private Integer operationType;
    /**
     * 订单信息
     */
    private OrderInfo orderInfo;

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public Integer getOperationType() {
        return operationType;
    }

    public void setOperationType(Integer operationType) {
        this.operationType = operationType;
    }

    public OrderInfo getOrderInfo() {
        return orderInfo;
    }

    public void setOrderInfo(OrderInfo orderInfo) {
        this.orderInfo = orderInfo;
    }

    @Override
    public String toString() {
        return "StockUpdateMessage{" +
                "messageId='" + messageId + '\'' +
                ", operationType=" + operationType +
                ", orderInfo=" + orderInfo +
                '}';
    }
}
